<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Exp extends Model
{
    protected $table = 'exp';
    protected $dateFormat = 'U';

    const UPDATED_AT = 'create_time';
    const CREATED_AT = 'update_time';

    protected $fillable = [
        'user_id', 'time', 'use_skill', 'res_job', 'hidden', 'title'
    ];

    public function getUseSkillAttribute() {
        return json_decode($this->attributes['use_skill']);
    }

    public function getResJobAttribute() {
        return json_decode($this->attributes['res_job']);
    }
}
